//人员管理下的基础信息模块
const express = require('express')
const router = express.Router()
const basicInfo_handler = require('../router_handler/basicInfo')
//导入验证表单数据的中间件
const validator = require('../util/validator')
//引入校验规则
const { add_schema,update_schema } = require('../schema/basicInfo')

//基础信息表格
router.post('/getBasicInfo',basicInfo_handler.basicInfo)
//添加
router.post('/addBasic', validator.body(add_schema), basicInfo_handler.addBasic)
//修改
router.post('/updateBasic', validator.body(update_schema), basicInfo_handler.updateBasic)
//删除基础信息
router.post('/deleteBasic',basicInfo_handler.deleteBasic)

module.exports = router
